package com.example.xadmin.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * <p>
 * 
 * </p>
 *
 * @author Administrator
 * @since 2020-04-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_role_permission")
public class SysRolePermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = ROLEID, type = IdType.INPUT)
    private Integer roleId;

    @TableField(PERMISSIONID)
    private Integer permissionId;


    public static final String ROLEID = "`roleId`";

    public static final String PERMISSIONID = "`permissionId`";


    public static final String ROLEID_COMMENT = "";

    public static final String PERMISSIONID_COMMENT = "";



    public static SysRolePermission of(Object obj) {
        SysRolePermission e = new SysRolePermission();
        BeanUtils.copyProperties(obj, e);
        return e;
    }

    public static QueryWrapper<SysRolePermission> queryWrapper(Object obj) {
        return new QueryWrapper<>(of(obj));
    }

}
